Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Storage Messages


GXFetchTaggedData

QuickDraw GX, an application, a printing extension, or a printer driver can send the GXFetchTaggedData message to retrieve or modify data from a resource. You can override the GXFetchTaggedData message to modify data from your resources at run time. Use GXFetchTaggedData to retrieve and modify resource data that you access by resource type and ID. Your override of the GXFetchTaggedData message must match the following formal declaration:

OSErr MyFetchTaggedData (ResType aResType, short id, 
                        Handle *aHandle, Signature owner);
aResType
On input, the resource type in which you are interested.
id
The resource ID.
aHandle
On return, a pointer to a handle that contains the resource data.
owner
The owner of the requested data.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX or any message handler can send this message to obtain resource information from a printer driver. You can send this message to yourself to obtain data from a particular resource.

You specify the resource type and ID of the resource to retrieve in the aResType and
id parameters, respectively. The resource handle is returned with a handle value in the aHandle parameter. The owner parameter defines the owner type of the resource.

The default implementation of this message accesses the resource that belongs to the driver by calling the GetResource function and then calling the DetachResource function. Override this message if you wish to change resource data that is being read from a printing extension, a printer driver, or the desktop printer.

If you are not the owner of the data (that is, if the owner ID is not your creator type),
you need to forward this message. If the owner ID is 'drvr', the message is intended for the currently active driver. If you are the owner, you need to create a handle for the tagged data and fill it out. If you use the GetResource function to get the handle, be sure to call the DetachResource function to change the handle into a non-Resource Manager handle.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The GetResource and DetachResource functions are described in the chapter "Resource Manager" in Inside Macintosh: More Macintosh Toolbox.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help